package com.openx.xoj.service.impl;


import com.openx.xoj.mapper.QuestionMapper;
import com.openx.xoj.model.entity.Question;
import com.openx.xoj.service.QuestionBasicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class QuestionBasicServiceImpl implements QuestionBasicService {

    private final QuestionMapper questionsMapper;

    @Autowired
    public QuestionBasicServiceImpl(QuestionMapper questionMapper) {
        this.questionsMapper = questionMapper;
    }

    @Override
    public List<Question> findAll() {
        return questionsMapper.selectList(null); // 使用MyBatis-Plus提供的selectList方法查询所有数据
    }
}
